How to copy items from a dropdownbox to another [C#]

Posted by LuRsT on Stack Overflow See other posts from Stack Overflow or by LuRsT
Published on 2010-04-19T13:46:08Z Indexed on 2010/04/19 13:53 UTC
Read the original article Hit count: 143

Filed under:
|
|

How can I copy items hardcoded from one dropdown box to another keeping the keys and values?

                drpTypes.Items.Add(new ListItem("Tipos de Acções", "1"));
                drpTypes.Items.Add(new ListItem("Tipos de Combustível", "2"));
                drpTypes.Items.Add(new ListItem("Tipos de Condutor", "3"));

                drpTypesCreateEdit.Items.AddRange(drpTypes.Items);

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET